home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.1 KB | 108 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWRRcShp.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWRRCSHP_H
- #define FWRRCSHP_H
-
- #ifndef FWSHAPE_H
- #include "FWShape.h"
- #endif
-
- #ifndef FWBNDSHP_H
- #include "FWBndShp.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CGraphicContext;
-
- //========================================================================================
- // class FW_CRoundRectShape
- //========================================================================================
-
- class FW_CRoundRectShape : public FW_CBoundedShape
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(FW_CRoundRectShape)
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructors
- //
- public:
- FW_CRoundRectShape(const FW_CRect& rect,
- const FW_CPoint& ovalSize,
- FW_ERenderVerbs renderVerb,
- const FW_CInk& ink = FW_kNormalInk,
- const FW_CStyle& style = FW_kNormalStyle);
-
- FW_CRoundRectShape(const FW_CRoundRectShape& other);
- FW_CRoundRectShape(FW_CReadableStream& stream);
-
- virtual ~ FW_CRoundRectShape();
-
- //----------------------------------------------------------------------------------------
- // Operators
- //
- public:
- FW_CRoundRectShape& operator=(const FW_CRoundRectShape& other);
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Hit Testing -----
- virtual FW_Boolean HitTest(FW_CGraphicContext& gc,
- const FW_CPoint& test,
- FW_Fixed tolerance) const;
-
- // ----- Copying -----
- virtual FW_CShape* Copy() const;
-
- // ----- Rendering -----
- virtual void Render(FW_CGraphicContext& gc) const;
-
- // ----- Flatten -----
- virtual void Flatten(FW_CWritableStream& stream) const;
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- // ----- Rendering -----
- static void RenderRoundRect(FW_CGraphicContext& gc,
- const FW_CRect& rect,
- const FW_CPoint& ovalSize,
- FW_ERenderVerbs renderVerb,
- const FW_CInk& ink = FW_kNormalInk,
- const FW_CStyle& style = FW_kNormalStyle);
-
- // ----- Archiving -----
- static void* Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
-
- // ----- Geometry -----
- void SetGeometry(const FW_CRect& rect, const FW_CPoint& ovalSize);
- void GetGeometry(FW_CRect& rect, FW_CPoint& ovalSize) const;
-
- FW_CPoint GetOvalSize() const
- {return fOvalSize;}
- void SetOvalSize(const FW_CPoint& ovalSize)
- {fOvalSize = ovalSize;}
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_CPoint fOvalSize;
- };
-
- #endif
-